﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Model;
using SqlServerDAL;

public partial class VehicleUI_VehicleIndex : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //if (!Page.IsPostBack)
        //{
            if (Session["FilterFrameNO"] != null)
            {
                string frameNO = Session["FilterFrameNO"].ToString();
                Vehicle v = new VehicleDAL().GetModel(frameNO);
                if (v != null)
                    txt_VehicleID.Text = v.VehicleID.ToString();
            }
        //}
    }
    protected void btn_Sure_Click(object sender, EventArgs e)
    {
        Session["FilterFrameNO"] = txt_FrameNO.Text.Trim();
        Response.Redirect(Request.Url.ToString()); 
    }
}
